﻿
@helper RenderSnippet(string folder, string controlName)
     {     
         var snippets_path = Server.MapPath(string.Format("~\\{0}", folder));     
         var file = System.Xml.Linq.XElement.Load(string.Format("{0}\\{1}",snippets_path, "code.xml"));
    
     @( new HtmlString(file.Elements("snippet")
            .First(p=>p.Attribute("control").Value == controlName)
            .Value.ToString()));
    }
